// import "./App.less"
import router from "./router"
import { useRoutes } from "react-router-dom"

// import { lazy } from "react"
// const Admin = lazy(() => import("./pages/admin/Admin"))
// const Login = lazy(() => import("./pages/login/Login"))
function App() {
  const routers = useRoutes(router)
  // if (token === undefined) {
  //   history.push("/login")
  //   window.location.reload()
  // }

  return (
    <>{routers}</>
    // <Routes>
    //   <Route path="/" element={<Navigate to="/admin" />}></Route>
    //   <Route path="/admin/*" element={<Admin />}></Route>
    //   <Route path="/login" element={<Login />}></Route>
    // </Routes>
  )
}
export default App
